# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.676.14.33 -> 1.676.14.34 # mm/mmap.c 1.26 -> 1.27 # mm/memory.c 1.52 -> 1.53 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/09/27 bjorn_helgaas@hp.com 1.676.14.34 # Back out flush_tlb_pgtables change. # -------------------------------------------- # diff -Nru a/mm/memory.c b/mm/memory.c --- a/mm/memory.c Wed Oct 8 09:07:31 2003 +++ b/mm/memory.c Wed Oct 8 09:07:31 2003 @@ -146,7 +146,6 @@ void clear_page_tables(struct mm_struct *mm, unsigned long first, int nr) { pgd_t * page_dir = mm->pgd; - unsigned long last = first + nr; spin_lock(&mm->page_table_lock); page_dir += first; @@ -156,8 +155,6 @@ } while (--nr); spin_unlock(&mm->page_table_lock); - flush_tlb_pgtables(mm, first * PGDIR_SIZE, last * PGDIR_SIZE); - /* keep the page table cache within bounds */ check_pgt_cache(); } diff -Nru a/mm/mmap.c b/mm/mmap.c --- a/mm/mmap.c Wed Oct 8 09:07:31 2003 +++ b/mm/mmap.c Wed Oct 8 09:07:31 2003 @@ -906,6 +906,8 @@ break; } no_mmaps: + if (last < first) + return; /* * If the PGD bits are not consecutive in the virtual address, the * old method of shifting the VA >> by PGDIR_SHIFT doesn't work. @@ -914,6 +916,7 @@ end_index = pgd_index(last); if (end_index > start_index) { clear_page_tables(mm, start_index, end_index - start_index); + flush_tlb_pgtables(mm, first & PGDIR_MASK, last & PGDIR_MASK); } }